home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_06_07
/
v6n7030a.txt
< prev
next >
Wrap
Text File
|
1989-09-26
|
1KB
|
70 lines
#include <stdio.h>
main()
{
char *pc1 = 0;
char *pc2 = 0L;
char *pc3 = (void *)0;
char near *pnc1 = 0;
char near *pnc2 = 0L;
char near *pnc3 = (void *)0;
char far *pfc1 = 0;
char far *pfc2 = 0L;
char far *pfc3 = (void *)0;
printf("pc1 = %p\n", pc1);
printf("pc2 = %p\n", pc2);
printf("pc3 = %p\n", pc3);
printf("pnc1 = %Np\n", pnc1);
printf("pnc2 = %Np\n", pnc2);
printf("pnc3 = %Np\n", pnc3);
printf("pfc1 = %Fp\n", pfc1);
printf("pfc2 = %Fp\n", pfc2);
printf("pfc3 = %Fp\n", pfc3);
}
#include <stdio.h>
void test(char *p1, char near *p2, char far *p3);
main()
{
test(0, 0, 0);
test(0L, 0L, 0L);
}
void test(char *p1, char near *p2, char far *p3)
{
printf("p1 = %p\n", p1);
printf("p2 = %Np\n", p2);
printf("p3 = %Fp\n", p3);
}
/* small model */
p1 = 0000
p2 = 0000
p3 = 0000:0000
p1 = 0000
p2 = 0000
p3 = 0000:0000
/* large model */
p1 = 0000:0000
p2 = 0000
p3 = 0000:0000
p1 = 0000:0000
p2 = 0000
p3 = 0000:0000